package com.china.zhuoyue.sdk

import org.gradle.api.Plugin
import org.gradle.api.Project

class ZhuoYueConfig {
    boolean mall;
}

public class PluginImpl implements Plugin<Project> {

    void apply(Project project) {
        project.extensions.create("zhuoYue", ZhuoYueConfig)
        System.out.println("========================");
        System.out.println("hello gradle plugin!");
        System.out.println("========================");
        project.extensions.findByType(ZhuoYueConfig).mall
        project.afterEvaluate {
            System.out.println("=====afterEvaluate====${project.zhuoYue.mall}===============");

            project.dependencies {
                implementation "androidx.appcompat:appcompat:1.4.0-alpha02"
            }
            project.configurations.all {
                resolutionStrategy.eachDependency { details ->
                    System.out.println("===========${details.requested.group}=============");
                }
            }
        }
    }
}